<html>
<head><meta charset="utf-8"><title>associate type bounds · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html">associate type bounds</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="156873573"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156873573" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156873573">(Jan 25 2019 at 18:42)</a>:</h4>
<p><span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> I have a few minutes. I still think it's related to the parent def-id, however. (Though there may be a few other edits required)</p>
<p>In particular, the error that you <a href="https://github.com/rust-lang/rust/pull/57428#issuecomment-457432532" target="_blank" title="https://github.com/rust-lang/rust/pull/57428#issuecomment-457432532">mention here</a> comes because the <code>TyOpaque</code> was not replaced with an inference variable in the right places. That "instantiation logic" I believe at least <em>interacts</em> with the parent def-id -- but it may be that we also have to invoke it at the right spot</p>



<a name="156873583"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156873583" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156873583">(Jan 25 2019 at 18:42)</a>:</h4>
<p>But you mentioned having a bit more debugging to note down?</p>



<a name="156873658"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156873658" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156873658">(Jan 25 2019 at 18:43)</a>:</h4>
<p>Okay thanks. So I made the change you suggested (and even stopped ConstraintLocator looking within the outermost existential node), but same error...</p>



<a name="156873703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156873703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156873703">(Jan 25 2019 at 18:44)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> what would the "right spot" be here? I haven't done a lot of work with inference.</p>



<a name="156873927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156873927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156873927">(Jan 25 2019 at 18:47)</a>:</h4>
<p><span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> have you pushed said changes?</p>



<a name="156873944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156873944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156873944">(Jan 25 2019 at 18:47)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> no, let me do so now</p>



<a name="156874003"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156874003" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156874003">(Jan 25 2019 at 18:47)</a>:</h4>
<p>OK. I mean, the next thing is to try and track a bit the origin of the error. It can be an annoying process. One thing that may help is <code>-Ztreat-err-as-bug</code> and <code>RUST_BACKTRACE</code>, which I think in this case should give you a good picture of the backtrace</p>



<a name="156874050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156874050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156874050">(Jan 25 2019 at 18:48)</a>:</h4>
<p>but if you push I can certainly take a look</p>



<a name="156874152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156874152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156874152">(Jan 25 2019 at 18:49)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> yeah I tried that</p>



<a name="156874260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156874260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156874260">(Jan 25 2019 at 18:50)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <a href="https://gist.github.com/d35867024089dc1c3097307f75c77267" target="_blank" title="https://gist.github.com/d35867024089dc1c3097307f75c77267">https://gist.github.com/d35867024089dc1c3097307f75c77267</a></p>



<a name="156874913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156874913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156874913">(Jan 25 2019 at 18:56)</a>:</h4>
<p><span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> I don't see any new commits on <code>alexreg/associated_type_bounds</code> yet</p>



<a name="156874957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156874957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156874957">(Jan 25 2019 at 18:57)</a>:</h4>
<p>also, i'm not sure that gist is what you meant to send...?</p>



<a name="156876186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156876186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156876186">(Jan 25 2019 at 19:10)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> sorry, was cleaning up the commit history for you. pushed now.</p>



<a name="156876191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156876191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156876191">(Jan 25 2019 at 19:10)</a>:</h4>
<p>oops</p>



<a name="156876215"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156876215" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156876215">(Jan 25 2019 at 19:11)</a>:</h4>
<p>stupid command-line Gist ;-)</p>



<a name="156876310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156876310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156876310">(Jan 25 2019 at 19:12)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <a href="https://gist.github.com/alexreg/6a944716d4bc6b535daa587d31e5afb9" target="_blank" title="https://gist.github.com/alexreg/6a944716d4bc6b535daa587d31e5afb9">https://gist.github.com/alexreg/6a944716d4bc6b535daa587d31e5afb9</a></p>



<a name="156877586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156877586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156877586">(Jan 25 2019 at 19:26)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> sorry some nasty debugging code is still in there... hopefully it's okay for you though! you can still pick out the relevant changes easily enough I think.</p>



<a name="156878536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156878536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156878536">(Jan 25 2019 at 19:38)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> so the question is, where do we instantiate the inference var? (if indeed we do) :-)</p>



<a name="156889467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156889467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156889467">(Jan 25 2019 at 22:13)</a>:</h4>
<p>So <span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> from what I can tell from looking at your branch, the problem is still that you have the wrong parent.</p>
<p>I <em>think</em> at least that the error arises because, when we are running <code>check_fn</code> on the function that winds up defining all the things, it invokes <code>fcx.instantiate_opaque_types_from_value(fn_id, &amp;declared_ret_ty)</code>. This will iterate down in the <code>instantiate_opaque_types_in_map</code> fn, walking down the value. </p>
<p>It will encounter the existential type <code>Bar</code>.  and then it will check if <code>Bar</code> is "in scope" -- i.e., this is a defining use. It determines <em>yes</em>. So it invokes <code>fold_opaque_ty</code>.</p>
<p>This will create a type inference variable (<code>opaque_types/mod.rs:759</code>, on your branch). It then gets the bounds for the existential type:</p>
<div class="codehilite"><pre><span></span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="n">bounds</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">predicates_of</span><span class="p">.</span><span class="n">instantiate</span><span class="p">(</span><span class="n">tcx</span><span class="p">,</span><span class="w"> </span><span class="n">substs</span><span class="p">)</span><span class="w"></span>
</pre></div>


<p>and (later) iterates over them:</p>
<div class="codehilite"><pre><span></span><span class="w">        </span><span class="k">for</span><span class="w"> </span><span class="n">predicate</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="n">bounds</span><span class="p">.</span><span class="n">predicates</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="c1">// Change the predicate to refer to the type variable,</span>
<span class="w">            </span><span class="c1">// which will be the concrete type instead of the opaque type.</span>
<span class="w">            </span><span class="c1">// This also instantiates nested instances of `impl Trait`.</span>
<span class="w">            </span><span class="kd">let</span><span class="w"> </span><span class="n">predicate</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">instantiate_opaque_types_in_map</span><span class="p">(</span><span class="o">&amp;</span><span class="n">predicate</span><span class="p">);</span><span class="w"></span>
</pre></div>


<p>note that, in the process, it is instantiating any opaque types that appear in <strong>those</strong> bounds. This should cover your <code>impl Trait</code> -- but I think it <em>doesn't</em>, because the "parent" value is not correct, and so <code>instantiate_opaque_types_in_map</code> does not treat this as a defining use.</p>



<a name="156889697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156889697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156889697">(Jan 25 2019 at 22:16)</a>:</h4>
<p>hmm</p>



<a name="156889699"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156889699" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156889699">(Jan 25 2019 at 22:16)</a>:</h4>
<p>let me think!</p>



<a name="156889709"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156889709" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156889709">(Jan 25 2019 at 22:16)</a>:</h4>
<p>sounds like you have a point though, on first sight</p>



<a name="156889991"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156889991" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156889991">(Jan 25 2019 at 22:20)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> where is the parent node set for the nested existential type node? isn't it where I just edited the code?</p>



<a name="156951562"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/156951562" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#156951562">(Jan 27 2019 at 02:19)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> solved. the key was the <code>may_define_existential_type</code> fn. thanks for your help!</p>



<a name="157037784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157037784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157037784">(Jan 28 2019 at 16:31)</a>:</h4>
<p><span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> great!</p>



<a name="157037877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157037877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157037877">(Jan 28 2019 at 16:32)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> yeah, seems to be working nicely. (Centril is writing up some test cases, but what I've tested so far looks good. Thanks a lot for the advice.) So, I'm now just working on the last remaining big case for this PR, which is <code>impl Trait</code> in associated types.</p>



<a name="157037885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157037885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157037885">(Jan 28 2019 at 16:32)</a>:</h4>
<p>it's a bit trickier, but I figured out how to do it I think</p>



<a name="157037898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157037898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157037898">(Jan 28 2019 at 16:32)</a>:</h4>
<p>a couple of small questions, which maybe you can help with:</p>



<a name="157037925"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157037925" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157037925">(Jan 28 2019 at 16:33)</a>:</h4>
<p>ok</p>



<a name="157038028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038028">(Jan 28 2019 at 16:34)</a>:</h4>
<p>can I generate a self <code>Ty</code> during HIR lowering?</p>



<a name="157038029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038029">(Jan 28 2019 at 16:34)</a>:</h4>
<p>(and if so, how?)</p>



<a name="157038080"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038080" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038080">(Jan 28 2019 at 16:35)</a>:</h4>
<p>and secondly, I need to generate a unique ident for the fresh associated type. I was thinking of using the "Path" of the <code>impl Trait</code> within the original associated type, but wasn't exactly sure.</p>



<a name="157038145"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038145" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038145">(Jan 28 2019 at 16:36)</a>:</h4>
<p>a nice deterministic way like this would be cool, since I can use that for impls of the trait</p>



<a name="157038167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038167">(Jan 28 2019 at 16:36)</a>:</h4>
<blockquote>
<p>can I generate a self <code>Ty</code> during HIR lowering?</p>
</blockquote>
<p>what do you mean by a "self ty"?</p>



<a name="157038192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038192">(Jan 28 2019 at 16:37)</a>:</h4>
<p>also, it would help me a bit if you gave me a concrete example of what you are trying to do</p>



<a name="157038217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038217">(Jan 28 2019 at 16:37)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Bar</span>: <span class="nb">Iterator</span><span class="o">&lt;</span><span class="n">Item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">impl</span><span class="w"> </span><span class="n">Display</span><span class="o">&gt;</span><span class="p">;</span><span class="w"> </span><span class="c1">// like this, I guess?</span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="157038232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038232">(Jan 28 2019 at 16:37)</a>:</h4>
<blockquote>
<p>and secondly, I need to generate a unique ident for the fresh associated type. I was thinking of using the "Path" of the <code>impl Trait</code> within the original associated type, but wasn't exactly sure.</p>
</blockquote>
<p>yeah hmm not sure -- say more about the role of this identifier?</p>



<a name="157038322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038322">(Jan 28 2019 at 16:38)</a>:</h4>
<p>sorry, yeah, let me be specific</p>



<a name="157038343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038343">(Jan 28 2019 at 16:39)</a>:</h4>
<p>for self ty... I want to generate a <code>Path</code> to <code>Self::GeneratedAssocType</code></p>



<a name="157038348"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038348" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038348">(Jan 28 2019 at 16:39)</a>:</h4>
<p>we're doing desugaring like:</p>



<a name="157038427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038427">(Jan 28 2019 at 16:40)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Bar</span>: <span class="nb">Iterator</span><span class="o">&lt;</span><span class="n">Item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">impl</span><span class="w"> </span><span class="n">Display</span><span class="o">&gt;</span><span class="p">;</span><span class="w"> </span><span class="c1">// alternatively &lt;Item: Display&gt;</span>
<span class="p">}</span><span class="w"></span>
</pre></div>


<p>to</p>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Bar</span>: <span class="nb">Iterator</span><span class="o">&lt;</span><span class="n">Item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">_0</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">_0</span>: <span class="nc">Display</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="157038442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038442">(Jan 28 2019 at 16:40)</a>:</h4>
<p>right</p>



<a name="157038449"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038449" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038449">(Jan 28 2019 at 16:41)</a>:</h4>
<p>so you want a path like <code>Self::_0</code>?</p>



<a name="157038547"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038547" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038547">(Jan 28 2019 at 16:42)</a>:</h4>
<p>then we'd have an impl like:</p>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">SomeStruct</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ConcreteIterator</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>


<p>desugared to</p>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">SomeStruct</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ConcreteIterator</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">_0</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="n">inferred</span><span class="p">};</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="157038550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038550">(Jan 28 2019 at 16:42)</a>:</h4>
<p>yep</p>



<a name="157038552"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038552" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038552">(Jan 28 2019 at 16:42)</a>:</h4>
<p>that</p>



<a name="157038581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038581">(Jan 28 2019 at 16:43)</a>:</h4>
<p>at least, that's how I think we want to do desugaring in the impl case</p>



<a name="157038607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038607">(Jan 28 2019 at 16:43)</a>:</h4>
<p>it seems like that should be possible</p>



<a name="157038613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038613">(Jan 28 2019 at 16:43)</a>:</h4>
<p>I'm skimming the HIR structs a bit</p>



<a name="157038653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038653">(Jan 28 2019 at 16:44)</a>:</h4>
<p>sure</p>



<a name="157038667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038667">(Jan 28 2019 at 16:44)</a>:</h4>
<p>sadly the "usual" way to generate a self ty is through the tcx methods</p>



<a name="157038672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038672">(Jan 28 2019 at 16:44)</a>:</h4>
<p>which isn't available during lowering of course</p>



<a name="157038713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038713">(Jan 28 2019 at 16:45)</a>:</h4>
<p>well</p>



<a name="157038738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038738">(Jan 28 2019 at 16:45)</a>:</h4>
<p>that's true</p>



<a name="157038772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038772">(Jan 28 2019 at 16:46)</a>:</h4>
<p>there are some options</p>



<a name="157038795"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038795" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038795">(Jan 28 2019 at 16:46)</a>:</h4>
<p>I'm debating the best course here</p>



<a name="157038823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038823">(Jan 28 2019 at 16:46)</a>:</h4>
<p>so, for example, when we lower <code>-&gt; impl Foo</code> to <code>-&gt; X</code> (where <code>X</code> is a new existential type), we don't generate a "synthesized" path, but rather make a <code>TyKind:Def(...)</code></p>



<a name="157038842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038842">(Jan 28 2019 at 16:47)</a>:</h4>
<p>one could imagine adding some similar thing</p>



<a name="157038850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038850">(Jan 28 2019 at 16:47)</a>:</h4>
<p>yes</p>



<a name="157038854"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038854" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038854">(Jan 28 2019 at 16:47)</a>:</h4>
<p>alternatively, you could make a <code>QPath</code>, which is fine</p>



<a name="157038860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038860">(Jan 28 2019 at 16:47)</a>:</h4>
<p>I wonder if that may be problematic here though</p>



<a name="157038866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038866">(Jan 28 2019 at 16:47)</a>:</h4>
<p><code>QPath::Resolved</code>, I imagine</p>



<a name="157038870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038870">(Jan 28 2019 at 16:47)</a>:</h4>
<p>but we need to specify the self type</p>



<a name="157038885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038885">(Jan 28 2019 at 16:47)</a>:</h4>
<p>also, the inference for the concrete type is the impl is still not clear to me</p>



<a name="157038948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038948">(Jan 28 2019 at 16:48)</a>:</h4>
<p>which is I think just a path</p>



<a name="157038951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038951">(Jan 28 2019 at 16:48)</a>:</h4>
<p>(when a user types it, anyway)</p>



<a name="157038963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038963">(Jan 28 2019 at 16:48)</a>:</h4>
<p>yeah</p>



<a name="157038965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038965">(Jan 28 2019 at 16:48)</a>:</h4>
<blockquote>
<p>also, the inference for the concrete type is the impl is still not clear to me</p>
</blockquote>
<p>concrete type <strong>in</strong> the impl?</p>



<a name="157038990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038990">(Jan 28 2019 at 16:49)</a>:</h4>
<blockquote>
<p>which is I think just a path</p>
</blockquote>
<p>(but you could potentially use <code>TyKind::Def</code> with the id of the <code>Self</code> type parameter)</p>



<a name="157038992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038992">(Jan 28 2019 at 16:49)</a>:</h4>
<p>yeah. the concrete type for the associated type</p>



<a name="157038998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157038998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157038998">(Jan 28 2019 at 16:49)</a>:</h4>
<p>(in my above example)</p>



<a name="157039013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039013">(Jan 28 2019 at 16:49)</a>:</h4>
<p>well</p>



<a name="157039058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039058">(Jan 28 2019 at 16:50)</a>:</h4>
<p>your example is probably not the correct desugaring, really</p>



<a name="157039069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039069">(Jan 28 2019 at 16:50)</a>:</h4>
<p>in particular, <code>type _0 = &lt;inferred&gt;</code> is not, I think, what we want</p>



<a name="157039075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039075">(Jan 28 2019 at 16:50)</a>:</h4>
<p>because that was "expose" what <code>_0</code> is</p>



<a name="157039078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039078">(Jan 28 2019 at 16:50)</a>:</h4>
<p>yeah. I was actually wondering about that as soon as I typed it.</p>



<a name="157039083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039083">(Jan 28 2019 at 16:50)</a>:</h4>
<p>it's what Centril wrote in his PR.</p>



<a name="157039088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039088">(Jan 28 2019 at 16:50)</a>:</h4>
<p>but I'm doubtful now</p>



<a name="157039091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039091">(Jan 28 2019 at 16:50)</a>:</h4>
<p>yes, it's just not correct</p>



<a name="157039139"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039139" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039139">(Jan 28 2019 at 16:51)</a>:</h4>
<p>so how do you propose we do it?</p>



<a name="157039155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039155">(Jan 28 2019 at 16:51)</a>:</h4>
<p>I don't thing we can desugar to normal <code>existential type</code>s though... can we?</p>



<a name="157039173"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039173" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039173">(Jan 28 2019 at 16:51)</a>:</h4>
<p>(or associated existential types, rather)</p>



<a name="157039174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039174">(Jan 28 2019 at 16:51)</a>:</h4>
<p>I think what we want is something closer to this:</p>
<div class="codehilite"><pre><span></span><span class="n">existential</span><span class="w"> </span><span class="k">type</span> <span class="nc">_0</span><span class="p">;</span><span class="w"></span>

<span class="k">impl</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">SomeStruct</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ConcreteIterator</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">_0</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">_0</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="157039183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039183">(Jan 28 2019 at 16:51)</a>:</h4>
<p>aha</p>



<a name="157039185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039185">(Jan 28 2019 at 16:51)</a>:</h4>
<p>(where the scope of the <code>existential</code> is not the enclosing module, but the impl)</p>



<a name="157039247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039247">(Jan 28 2019 at 16:52)</a>:</h4>
<p>much like how </p>
<div class="codehilite"><pre><span></span><span class="k">fn</span> <span class="nf">foo</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="nc">impl</span><span class="w"> </span><span class="n">Blah</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">..</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
</pre></div>


<p>desugars to</p>
<div class="codehilite"><pre><span></span><span class="n">existential</span><span class="w"> </span><span class="k">type</span> <span class="nc">X</span><span class="p">;</span><span class="w"></span>
<span class="k">fn</span> <span class="nf">foo</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="nc">X</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">..</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
</pre></div>


<p>but where <code>X</code> is scoped to the <code>fn</code></p>



<a name="157039262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039262">(Jan 28 2019 at 16:52)</a>:</h4>
<p>HIR and later stages might allow existential types in the module already? not sure. of course, syntax doesn't.</p>



<a name="157039265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039265">(Jan 28 2019 at 16:52)</a>:</h4>
<p>only in traits</p>



<a name="157039276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039276">(Jan 28 2019 at 16:52)</a>:</h4>
<blockquote>
<p>HIR and later stages might allow existential types in the module already? not sure. of course, syntax doesn't.</p>
</blockquote>
<p>why do you say syntax doesn't?</p>



<a name="157039321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039321">(Jan 28 2019 at 16:53)</a>:</h4>
<p>check out e.g. <code>src/test/ui/existential_types/bound_reduction.rs</code></p>



<a name="157039332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039332">(Jan 28 2019 at 16:54)</a>:</h4>
<p>(just picked at random)</p>



<a name="157039442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039442">(Jan 28 2019 at 16:55)</a>:</h4>
<p>that's not scoped to an impl though</p>



<a name="157039497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039497">(Jan 28 2019 at 16:56)</a>:</h4>
<p>I mean...</p>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="w"> </span><span class="n">Trait</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">existential</span><span class="w"> </span><span class="k">type</span> <span class="nc">Bar</span>: <span class="nb">Send</span><span class="p">;</span><span class="w"> </span><span class="c1">// not allowed now</span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="157039509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039509">(Jan 28 2019 at 16:56)</a>:</h4>
<p>yes, it is scoped too large</p>



<a name="157039531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039531">(Jan 28 2019 at 16:56)</a>:</h4>
<p><a href="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=48ce0fef72363d9a9e1bb25083fedb06" target="_blank" title="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=48ce0fef72363d9a9e1bb25083fedb06">also, this does not compile</a> -- I'm a <em>bit</em> surprised by that.</p>



<a name="157039534"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039534" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039534">(Jan 28 2019 at 16:56)</a>:</h4>
<p>syntax doesn't allow this scoping, is what I mean, but maybe HIR and later copes with it fine?</p>



<a name="157039540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039540">(Jan 28 2019 at 16:56)</a>:</h4>
<p>I suspect it is because of when the impl checks are done</p>



<a name="157039556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039556">(Jan 28 2019 at 16:57)</a>:</h4>
<blockquote>
<p>syntax doesn't allow this scoping, is what I mean, but maybe HIR and later copes with it fine?</p>
</blockquote>
<p>ah, yes, correct. but that's somehow a secondary problem to the one I just raised =)</p>



<a name="157039581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039581">(Jan 28 2019 at 16:57)</a>:</h4>
<p>right now, the scoping I think is either enclosing mod or -- for <code>impl Trait</code> desugarings -- enclosing fn, I'd have to review the code to see how general the HIR setup is</p>



<a name="157039582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039582">(Jan 28 2019 at 16:57)</a>:</h4>
<p>but we can presumably generalize it</p>



<a name="157039589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039589">(Jan 28 2019 at 16:57)</a>:</h4>
<p>still, scoping the enclosing module should work</p>



<a name="157039591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039591">(Jan 28 2019 at 16:57)</a>:</h4>
<p>(but doesn't)</p>



<a name="157039596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039596">(Jan 28 2019 at 16:57)</a>:</h4>
<p>so I'd probably start by trying to solve <em>that</em></p>



<a name="157039644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039644">(Jan 28 2019 at 16:58)</a>:</h4>
<p>that's a bit worrying yes!</p>



<a name="157039657"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039657" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039657">(Jan 28 2019 at 16:58)</a>:</h4>
<p>I also think you may be biting off more than you have to chew in this partcular PR</p>



<a name="157039665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039665">(Jan 28 2019 at 16:58)</a>:</h4>
<p>that is, I would encourage you to try to land the PR if it is at a coherent point</p>



<a name="157039670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039670">(Jan 28 2019 at 16:58)</a>:</h4>
<p>vs trying to fix all the things in one PR</p>



<a name="157039741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039741">(Jan 28 2019 at 16:59)</a>:</h4>
<p>yeah, maybe a fair point!</p>



<a name="157039800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039800">(Jan 28 2019 at 17:00)</a>:</h4>
<p>gotta run now (meetings), but hopefully that helps a bit :)</p>



<a name="157039801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039801">(Jan 28 2019 at 17:00)</a>:</h4>
<p>we don't want another const generics PR</p>



<a name="157039810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039810">(Jan 28 2019 at 17:00)</a>:</h4>
<p>one more small questions...</p>



<a name="157039815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039815">(Jan 28 2019 at 17:00)</a>:</h4>
<p>(go for it)</p>



<a name="157039816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039816">(Jan 28 2019 at 17:00)</a>:</h4>
<p>(thanks, it does)</p>



<a name="157039830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039830">(Jan 28 2019 at 17:00)</a>:</h4>
<p>can you compile those notes on impl-trait-in-bindings soon? :-)</p>



<a name="157039832"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039832" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039832">(Jan 28 2019 at 17:00)</a>:</h4>
<p>from chat, github, etc.</p>



<a name="157039835"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039835" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039835">(Jan 28 2019 at 17:00)</a>:</h4>
<p>gist</p>



<a name="157039841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039841">(Jan 28 2019 at 17:00)</a>:</h4>
<p>I can help try to locate them if you like</p>



<a name="157039845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039845">(Jan 28 2019 at 17:00)</a>:</h4>
<p>then maybe you could collate them if you don't mind?</p>



<a name="157039999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157039999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157039999">(Jan 28 2019 at 17:03)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> ^</p>



<a name="157040156"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157040156" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157040156">(Jan 28 2019 at 17:05)</a>:</h4>
<p>uuuuuuuh ok :) I sort of forgot, were you waiting on notes?</p>



<a name="157040990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157040990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157040990">(Jan 28 2019 at 17:17)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> yeah. just a compilation of your previous notes really, which I think were converging on a good solution. I may have offered some input, but it was mainly you. :-) do you want me to help dig up the various bits and pieces for you to collate into something more coherent and self-contained? I may miss something but happy to try.</p>



<a name="157061227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157061227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157061227">(Jan 28 2019 at 21:57)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> still around by chance? :-)</p>



<a name="157117846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157117846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157117846">(Jan 29 2019 at 16:41)</a>:</h4>
<p>hi <span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span class="user-mention" data-user-id="131694">@scalexm</span> -- did you see <a href="https://github.com/rust-lang/rust/issues/57961" target="_blank" title="https://github.com/rust-lang/rust/issues/57961">https://github.com/rust-lang/rust/issues/57961</a> by chance?</p>



<a name="157120917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157120917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157120917">(Jan 29 2019 at 17:20)</a>:</h4>
<p>I didn't see it yet; I do think we want something like it to work, I haven't looked closely at why it doesn't, though I have some theories</p>



<a name="157127725"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157127725" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157127725">(Jan 29 2019 at 18:48)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> it's basically just because only function return types are currently considered defining uses, like Oli was saying, I think.</p>



<a name="157127748"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157127748" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157127748">(Jan 29 2019 at 18:48)</a>:</h4>
<p>If you could confirm/deny whether it needs an RFC, that would be great. (Hopefully not, despite what he says, but if we need one, we need one...)</p>



<a name="157135381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157135381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157135381">(Jan 29 2019 at 20:31)</a>:</h4>
<p><span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> ok <a href="https://github.com/rust-lang/rust/issues/57961#issuecomment-458695187" target="_blank" title="https://github.com/rust-lang/rust/issues/57961#issuecomment-458695187">replied</a></p>



<a name="157148840"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/157148840" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#157148840">(Jan 29 2019 at 23:39)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> thanks for that.</p>



<a name="160107043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160107043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160107043">(Mar 06 2019 at 15:48)</a>:</h4>
<p>hey <span class="user-mention" data-user-id="116009">@nikomatsakis</span>... I have a question about this, if you have just a few minutes.</p>



<a name="160109373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160109373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160109373">(Mar 06 2019 at 16:13)</a>:</h4>
<p><span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> what's your question</p>



<a name="160109394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160109394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160109394">(Mar 06 2019 at 16:13)</a>:</h4>
<p>I will be on and off today but I'll try to answer when I can =)</p>



<a name="160109457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160109457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160109457">(Mar 06 2019 at 16:14)</a>:</h4>
<p>so.... for this feature, I want to do something like the following: <a href="https://gist.github.com/alexreg/f073d737ae1db10034082e1a3e9c906e" target="_blank" title="https://gist.github.com/alexreg/f073d737ae1db10034082e1a3e9c906e">https://gist.github.com/alexreg/f073d737ae1db10034082e1a3e9c906e</a></p>



<a name="160109480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160109480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160109480">(Mar 06 2019 at 16:14)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> but ideally (I think) we avoid creating new names for new associated types</p>



<a name="160109483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160109483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160109483">(Mar 06 2019 at 16:14)</a>:</h4>
<p>or do we?</p>



<a name="160109487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160109487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160109487">(Mar 06 2019 at 16:14)</a>:</h4>
<p>the choices seem to be</p>



<a name="160109510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160109510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160109510">(Mar 06 2019 at 16:14)</a>:</h4>
<p>A) embed the desugared associated types within the existing associated types</p>



<a name="160109543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160109543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160109543">(Mar 06 2019 at 16:15)</a>:</h4>
<p>B) generate new ones with unique names (perhaps the name of the DefId for the impl Trait)</p>



<a name="160109719"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160109719" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160109719">(Mar 06 2019 at 16:16)</a>:</h4>
<p>do you know what I mean?</p>



<a name="160109871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160109871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160109871">(Mar 06 2019 at 16:17)</a>:</h4>
<p>btw, in these desugarings, if you gensym, don't forget to ensure that this doesn't creep into diagnostics</p>



<a name="160110041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160110041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160110041">(Mar 06 2019 at 16:19)</a>:</h4>
<p><span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> Hmm, I don't think you have to do quite that desugaring</p>



<a name="160110075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160110075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160110075">(Mar 06 2019 at 16:19)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> I still don't undestand what gensyming is about</p>



<a name="160110151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160110151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160110151">(Mar 06 2019 at 16:20)</a>:</h4>
<p><span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> "generate unique names" is what I mean by that</p>



<a name="160110180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160110180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160110180">(Mar 06 2019 at 16:20)</a>:</h4>
<p>Presently, if we have:</p>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Bar</span>: <span class="nb">Iterator</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>


<p>this is <strong>already</strong> desugared, to some extent, to the following:</p>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="w"></span>
<span class="k">where</span><span class="w"> </span><span class="o">&lt;</span><span class="n">Self</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">Foo</span><span class="o">&gt;</span>::<span class="n">Bar</span>: <span class="nb">Iterator</span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Bar</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="160110212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160110212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160110212">(Mar 06 2019 at 16:20)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> well does that account for implied bounds? if you write the latter explicitly it won't</p>



<a name="160110269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160110269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160110269">(Mar 06 2019 at 16:21)</a>:</h4>
<p>you could imagine desugaring the example you gave instead to</p>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="w"></span>
<span class="k">where</span><span class="w"> </span><span class="o">&lt;</span><span class="n">Self</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">Foo</span><span class="o">&gt;</span>::<span class="n">Bar</span>: <span class="nb">Iterator</span><span class="p">,</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="n">Self</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">Foo</span><span class="o">&gt;</span>::<span class="n">Bar</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nb">Iterator</span><span class="o">&gt;</span>::<span class="n">Item</span>: <span class="nb">Send</span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Bar</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="160110277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160110277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160110277">(Mar 06 2019 at 16:21)</a>:</h4>
<p>we certainly won't be smart enough to track that all properly right now though</p>



<a name="160110284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160110284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160110284">(Mar 06 2019 at 16:21)</a>:</h4>
<p>but chalk would, I think</p>



<a name="160110364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160110364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160110364">(Mar 06 2019 at 16:22)</a>:</h4>
<blockquote>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> well does that account for implied bounds? if you write the latter explicitly it won't</p>
</blockquote>
<p>I don't recall the specifics, have to check. In chalk, we would handle the implied bounds equivalently in either case (and in fact we don't have a way to represent apart from the desugaring I gave), in rustc maybe not</p>



<a name="160110399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160110399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160110399">(Mar 06 2019 at 16:22)</a>:</h4>
<p>Point is, I'm not sure that introducing "fictitious" associated types is actually what we want to do</p>



<a name="160110523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160110523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160110523">(Mar 06 2019 at 16:24)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span>  The RFC specified the semantics in terms of generated associated types but noted that with the implied bounds rfc, the usual <code>where</code> clause desugaring would work; I think the latter is ideal and the former is perhaps an acceptable temporary solution</p>



<a name="160110549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160110549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160110549">(Mar 06 2019 at 16:24)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> the following <a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=cabcb7d95f93125bc059a144464dce2a" target="_blank" title="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=cabcb7d95f93125bc059a144464dce2a">compiles</a>:</p>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="w"></span>
<span class="k">where</span><span class="w"> </span><span class="o">&lt;</span><span class="n">Self</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">Foo</span><span class="o">&gt;</span>::<span class="n">Bar</span>: <span class="nb">Iterator</span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Bar</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">something</span><span class="o">&lt;</span><span class="n">T</span>: <span class="nc">Foo</span><span class="o">&gt;</span><span class="p">(</span><span class="k">mut</span><span class="w"> </span><span class="n">x</span>: <span class="nc">T</span>::<span class="n">Bar</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">x</span><span class="p">.</span><span class="n">next</span><span class="p">();</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="160110579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160110579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160110579">(Mar 06 2019 at 16:24)</a>:</h4>
<p>odd...</p>



<a name="160110594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160110594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160110594">(Mar 06 2019 at 16:24)</a>:</h4>
<p>(afk for a bit)</p>



<a name="160111171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160111171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160111171">(Mar 06 2019 at 16:31)</a>:</h4>
<p>but this doesn't:</p>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="k">where</span><span class="w"></span>
<span class="w">    </span><span class="o">&lt;</span><span class="n">Self</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">Foo</span><span class="o">&gt;</span>::<span class="n">Bar</span>: <span class="nb">Iterator</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="o">&lt;&lt;</span><span class="n">Self</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">Foo</span><span class="o">&gt;</span>::<span class="n">Bar</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nb">Iterator</span><span class="o">&gt;</span>::<span class="n">Item</span>: <span class="nb">Copy</span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Bar</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">use_foo</span><span class="o">&lt;</span><span class="n">X</span>: <span class="nc">Foo</span><span class="o">&gt;</span><span class="p">(</span><span class="n">arg</span>: <span class="nc">X</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">assert_copy</span><span class="o">&lt;</span><span class="n">T</span>: <span class="nb">Copy</span><span class="o">&gt;</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
<span class="w">    </span><span class="n">assert_copy</span>::<span class="o">&lt;&lt;&lt;</span><span class="n">X</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">Foo</span><span class="o">&gt;</span>::<span class="n">Bar</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nb">Iterator</span><span class="o">&gt;</span>::<span class="n">Item</span><span class="o">&gt;</span><span class="p">();</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="160111622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160111622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160111622">(Mar 06 2019 at 16:38)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> are you sure it isn't? I don't see a good alternative, at least until we have implied bounds</p>



<a name="160111749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160111749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160111749">(Mar 06 2019 at 16:39)</a>:</h4>
<p>One possible option is the <code>where</code>-clause desugaring as a temporary solution; that gives you worse usability but is probably cleaner... once we get implied bounds we get the usability improvements</p>



<a name="160113305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160113305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160113305">(Mar 06 2019 at 16:59)</a>:</h4>
<p>maybe yes...</p>



<a name="160113329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160113329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160113329">(Mar 06 2019 at 16:59)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> I may end up going that way in fact, now that you say it</p>



<a name="160113338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160113338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160113338">(Mar 06 2019 at 16:59)</a>:</h4>
<p>it's a good stop-gap</p>



<a name="160113417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160113417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160113417">(Mar 06 2019 at 17:00)</a>:</h4>
<p>yup</p>



<a name="160114498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160114498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160114498">(Mar 06 2019 at 17:13)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> so make sure you note which tests you're writing require the fully-correct implemention, so we can comment them out for now ;-)</p>



<a name="160114587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160114587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160114587">(Mar 06 2019 at 17:14)</a>:</h4>
<p>oh dear; I'm focusing on dishing out as many tests as possible now; I think those tests are limited to one file tho</p>



<a name="160116269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160116269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160116269">(Mar 06 2019 at 17:33)</a>:</h4>
<p>heh</p>



<a name="160116270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160116270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160116270">(Mar 06 2019 at 17:33)</a>:</h4>
<p>multiple files is fine to be honest...</p>



<a name="160116275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160116275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160116275">(Mar 06 2019 at 17:33)</a>:</h4>
<p>we can great a new dir</p>



<a name="160116841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160116841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160116841">(Mar 06 2019 at 17:39)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> so something like this? (<code>desugared-2.rs</code>) -- <a href="https://gist.github.com/alexreg/f073d737ae1db10034082e1a3e9c906e" target="_blank" title="https://gist.github.com/alexreg/f073d737ae1db10034082e1a3e9c906e">https://gist.github.com/alexreg/f073d737ae1db10034082e1a3e9c906e</a></p>



<a name="160116863"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160116863" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160116863">(Mar 06 2019 at 17:39)</a>:</h4>
<p>does this have any implications for object safety compared to <code>desugared.rs</code>?</p>



<a name="160117004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160117004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160117004">(Mar 06 2019 at 17:41)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="o">&lt;</span><span class="n">Self</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">Foo</span><span class="o">&gt;</span>::<span class="n">Bar</span>: <span class="nb">Iterator</span><span class="p">,</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="n">Self</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">Foo</span><span class="o">&gt;</span>::<span class="n">Bar</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nb">Iterator</span><span class="o">&gt;</span>::<span class="n">Item</span>: <span class="nb">Send</span> <span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Bar</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">impl</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Iteerator</span><span class="o">&lt;</span><span class="n">Item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">()</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="160117040"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160117040" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160117040">(Mar 06 2019 at 17:41)</a>:</h4>
<p>(the impl isn't relevant)</p>



<a name="160117094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160117094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160117094">(Mar 06 2019 at 17:42)</a>:</h4>
<p>yeah I know, I just left it in for completeness</p>



<a name="160117095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160117095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160117095">(Mar 06 2019 at 17:42)</a>:</h4>
<p>hmm</p>



<a name="160117139"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160117139" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160117139">(Mar 06 2019 at 17:42)</a>:</h4>
<p>offhand idk about object safety; hear with Niko on that <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="160117140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160117140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160117140">(Mar 06 2019 at 17:42)</a>:</h4>
<p>I think <code>Bar: Iterator</code> is "desugared" at a later point though</p>



<a name="160117166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160117166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160117166">(Mar 06 2019 at 17:43)</a>:</h4>
<p><code>type Bar: Iterator;</code> is allowed though, surely?</p>



<a name="160117176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160117176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160117176">(Mar 06 2019 at 17:43)</a>:</h4>
<p>presumably you do some recursive expansion?</p>



<a name="160117181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160117181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160117181">(Mar 06 2019 at 17:43)</a>:</h4>
<p>no</p>



<a name="160117204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160117204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160117204">(Mar 06 2019 at 17:43)</a>:</h4>
<p>because <code>type Bar: Iterator&lt;Item = Type&gt;</code> is currently left alone during HIR lowerinfg</p>



<a name="160117214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160117214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160117214">(Mar 06 2019 at 17:43)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> yeah, do give us your thoughts on object safety when you're back</p>



<a name="160117275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160117275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160117275">(Mar 06 2019 at 17:44)</a>:</h4>
<p>how do you deal with <code>trait Foo { type Assoc: Iterator&lt;Item: Iterator&lt;Item: Copy&gt;&gt;; }</code> if not with a recursive expansion?</p>



<a name="160117344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160117344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160117344">(Mar 06 2019 at 17:45)</a>:</h4>
<p>well, that's recursive... but I mean, only the associated bounds are dealt with specially</p>



<a name="160117363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160117363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160117363">(Mar 06 2019 at 17:45)</a>:</h4>
<p>ah; well... it doesn't matter much anyways; they are equivalent ^^</p>



<a name="160118699"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160118699" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160118699">(Mar 06 2019 at 18:01)</a>:</h4>
<p>okay. :-)</p>



<a name="160120381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160120381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160120381">(Mar 06 2019 at 18:21)</a>:</h4>
<p><span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> there's more work to be done with this, but here's a set of tests that should cover many things: <a href="https://gist.github.com/Centril/2470b7f89657da457ed25078a9cdab72" target="_blank" title="https://gist.github.com/Centril/2470b7f89657da457ed25078a9cdab72">https://gist.github.com/Centril/2470b7f89657da457ed25078a9cdab72</a> ; it primarily lacks compile-fail tests as well as some of the things noted in the checkboxes... I probably forgot other things too</p>



<a name="160120525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160120525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160120525">(Mar 06 2019 at 18:22)</a>:</h4>
<p>but... I've worked enough on this for 2+ days so I need a break :P</p>



<a name="160127287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160127287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160127287">(Mar 06 2019 at 19:36)</a>:</h4>
<p>thanks, will take a look soon :-)</p>



<a name="160127290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160127290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160127290">(Mar 06 2019 at 19:36)</a>:</h4>
<p>oh wow. that long?</p>



<a name="160127292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160127292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160127292">(Mar 06 2019 at 19:36)</a>:</h4>
<p>sounds good anyway!</p>



<a name="160128126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160128126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160128126">(Mar 06 2019 at 19:47)</a>:</h4>
<p>There's a lot of cases ;)</p>



<a name="160128213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160128213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160128213">(Mar 06 2019 at 19:48)</a>:</h4>
<p>We can iterate on them and add them iteratively ^^</p>



<a name="160133913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160133913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160133913">(Mar 06 2019 at 20:58)</a>:</h4>
<p>heh</p>



<a name="160159288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160159288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160159288">(Mar 07 2019 at 01:05)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> btw, any elaboration on where/how associated types are converted into predicates on traits would be be appreciated. I presume this is only during type checking, and not HIR lowering?</p>



<a name="160213980"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160213980" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160213980">(Mar 07 2019 at 16:36)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> hey, did you see the above by chance? :-)</p>



<a name="160223698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160223698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160223698">(Mar 07 2019 at 18:30)</a>:</h4>
<blockquote>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> yeah, do give us your thoughts on object safety when you're back</p>
</blockquote>
<p>say a bit more -- can you extract the specific question?</p>



<a name="160223722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160223722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160223722">(Mar 07 2019 at 18:30)</a>:</h4>
<blockquote>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> btw, any elaboration on where/how associated types are converted into predicates on traits would be be appreciated. I presume this is only during type checking, and not HIR lowering?</p>
</blockquote>
<p>I think this is done during the <code>predicates_of</code> query, let me go look</p>



<a name="160223895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160223895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160223895">(Mar 07 2019 at 18:32)</a>:</h4>
<p><span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> <a href="https://github.com/rust-lang/rust/blob/88f755f8a84df1d9e6b17cf10c96ae8b93481b2e/src/librustc_typeck/collect.rs#L2121-L2144" target="_blank" title="https://github.com/rust-lang/rust/blob/88f755f8a84df1d9e6b17cf10c96ae8b93481b2e/src/librustc_typeck/collect.rs#L2121-L2144">this is where we convert the associated type bounds into trait bounds</a></p>



<a name="160226218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160226218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160226218">(Mar 07 2019 at 18:59)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> do you see the Gist link? are their differences in object safety between the two desugarings?</p>



<a name="160226576"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160226576" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160226576">(Mar 07 2019 at 19:01)</a>:</h4>
<blockquote>
<p><span class="user-mention silent" data-user-id="124069">Alexander Regueiro</span> <a href="https://github.com/rust-lang/rust/blob/88f755f8a84df1d9e6b17cf10c96ae8b93481b2e/src/librustc_typeck/collect.rs#L2121-L2144" target="_blank" title="https://github.com/rust-lang/rust/blob/88f755f8a84df1d9e6b17cf10c96ae8b93481b2e/src/librustc_typeck/collect.rs#L2121-L2144">this is where we convert the associated type bounds into trait bounds</a></p>
</blockquote>
<p>that makes perfect sense. I wonder, in the case we have associated type bounds within traits (i.e. within associated type definitions), should we leave things like <code>Iterator&lt;Item: Send&gt;</code> alone until typeck time? i.e. have an HIR representation for it?</p>



<a name="160226587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160226587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160226587">(Mar 07 2019 at 19:01)</a>:</h4>
<p>seems easier...</p>



<a name="160235694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160235694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160235694">(Mar 07 2019 at 20:42)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> btw did you see the issue about trait alias I tagged you in recently?</p>



<a name="160243920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160243920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160243920">(Mar 07 2019 at 22:28)</a>:</h4>
<blockquote>
<p>btw did you see the issue about trait alias I tagged you in recently?</p>
</blockquote>
<p><span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> unlikely, I've had no time for GH notifications in weeks :(</p>



<a name="160243933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160243933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160243933">(Mar 07 2019 at 22:28)</a>:</h4>
<p>heh no worries</p>



<a name="160243954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160243954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160243954">(Mar 07 2019 at 22:28)</a>:</h4>
<blockquote>
<p>do you see the Gist link? are their differences in object safety between the two desugarings?</p>
</blockquote>
<p>do you mean <a href="https://gist.github.com/alexreg/f073d737ae1db10034082e1a3e9c906e#file-desugared-2-rs" target="_blank" title="https://gist.github.com/alexreg/f073d737ae1db10034082e1a3e9c906e#file-desugared-2-rs">this gist</a>?</p>



<a name="160243994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160243994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160243994">(Mar 07 2019 at 22:29)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> no? that links to something in wg-polonius</p>



<a name="160243997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160243997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160243997">(Mar 07 2019 at 22:29)</a>:</h4>
<p>In that gist, <a href="http://desugared-2.rs" target="_blank" title="http://desugared-2.rs">desugared-2.rs</a> doesn't look quite right</p>



<a name="160244006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244006">(Mar 07 2019 at 22:30)</a>:</h4>
<blockquote>
<p>no? that links to something in wg-polonius</p>
</blockquote>
<p>so it does..fixed</p>



<a name="160244075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244075">(Mar 07 2019 at 22:30)</a>:</h4>
<p>in particular, <a href="http://desugared-2.rs" target="_blank" title="http://desugared-2.rs">desugared-2.rs</a> says:</p>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">Self</span>::<span class="n">Bar</span>: <span class="nb">Send</span> <span class="p">{</span><span class="w"></span>
</pre></div>


<p>but I think it should be </p>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="o">&lt;</span><span class="n">Self</span>::<span class="n">Bar</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nb">Iterator</span><span class="o">&gt;</span>::<span class="n">Item</span>: <span class="nb">Send</span> <span class="p">{</span><span class="w"></span>
</pre></div>



<a name="160244093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244093">(Mar 07 2019 at 22:30)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> was just curious what the plan was for trait integrating my changes from that outstanding that detect multi-trait objects via trait aliases (which is permitted but ICEs right now!)</p>



<a name="160244110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244110">(Mar 07 2019 at 22:31)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> oh, yes. centril already corrected that. makes sense.</p>



<a name="160244120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244120">(Mar 07 2019 at 22:31)</a>:</h4>
<p>is it otherwise equivalent insofar as object safety is concerned?</p>



<a name="160244126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244126">(Mar 07 2019 at 22:31)</a>:</h4>
<p>In any case, I think that .. there are definitely <em>potential</em> differences w/r/t object safety</p>



<a name="160244149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244149">(Mar 07 2019 at 22:31)</a>:</h4>
<p>at present, object types require all the associated types to be named in the object type</p>



<a name="160244168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244168">(Mar 07 2019 at 22:31)</a>:</h4>
<p>right</p>



<a name="160244169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244169">(Mar 07 2019 at 22:31)</a>:</h4>
<p>in principle, this restriction can be lifted, but it's tricky</p>



<a name="160244213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244213">(Mar 07 2019 at 22:32)</a>:</h4>
<p>doesn't the Self bound affect things too?</p>



<a name="160244222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244222">(Mar 07 2019 at 22:32)</a>:</h4>
<p>so I don't really see any way that the first desugar could be made object-safe</p>



<a name="160244228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244228">(Mar 07 2019 at 22:32)</a>:</h4>
<p>mhm</p>



<a name="160244234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244234">(Mar 07 2019 at 22:32)</a>:</h4>
<p>that said, the second one is not object safe either :)</p>



<a name="160244246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244246">(Mar 07 2019 at 22:32)</a>:</h4>
<p>and sort of for the same underlying reason</p>



<a name="160244260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244260">(Mar 07 2019 at 22:32)</a>:</h4>
<p>well, let me think</p>



<a name="160244267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244267">(Mar 07 2019 at 22:32)</a>:</h4>
<p>I take that back somewhat</p>



<a name="160244278"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244278" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244278">(Mar 07 2019 at 22:33)</a>:</h4>
<p>I suspect the current object safety rules probably <em>would</em> reject it <em>but</em></p>



<a name="160244290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244290">(Mar 07 2019 at 22:33)</a>:</h4>
<p>I think it would be easier to accept it</p>



<a name="160244296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244296">(Mar 07 2019 at 22:33)</a>:</h4>
<p>in particular, in the first desugaring,</p>



<a name="160244305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244305">(Mar 07 2019 at 22:33)</a>:</h4>
<p>yeah. I suppose there are plans to relax object safety rules in the near future?</p>



<a name="160244313"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244313" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244313">(Mar 07 2019 at 22:33)</a>:</h4>
<p>the compiler doesn't know that <code>_0</code> is really a "type alias", so to speak</p>



<a name="160244321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244321">(Mar 07 2019 at 22:33)</a>:</h4>
<p>i.e., it is <strong>always</strong> equal to the <code>Item</code></p>



<a name="160244325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244325">(Mar 07 2019 at 22:33)</a>:</h4>
<p>of <code>Self::Bar</code></p>



<a name="160244332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244332">(Mar 07 2019 at 22:33)</a>:</h4>
<p>I presume you've seen what dtolnay did with erased-serde? that's kind of interesting, and magical (almost)</p>



<a name="160244338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244338">(Mar 07 2019 at 22:33)</a>:</h4>
<p>yeah</p>



<a name="160244340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244340">(Mar 07 2019 at 22:34)</a>:</h4>
<p>whereas that is explicit in the second form, I feel like we could probably permit those sorts of where clauses in object safety and it would work out ok</p>



<a name="160244386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244386">(Mar 07 2019 at 22:34)</a>:</h4>
<p>we might even do so now, though I bet we don't</p>



<a name="160244410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244410">(Mar 07 2019 at 22:34)</a>:</h4>
<p>we have a kind of filter on where <code>Self</code> can appear, I think this falls outside the current rules, but I <strong>think</strong> (at least off hand...) that the rules could be extended to include this sort of case</p>



<a name="160244412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244412">(Mar 07 2019 at 22:34)</a>:</h4>
<p>yeah, I don't know; haven't tested... but I suspect not too</p>



<a name="160244424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244424">(Mar 07 2019 at 22:34)</a>:</h4>
<p>okay :-)</p>



<a name="160244425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244425">(Mar 07 2019 at 22:34)</a>:</h4>
<p>the basic idea is</p>



<a name="160244437"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244437" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244437">(Mar 07 2019 at 22:34)</a>:</h4>
<p>if you were to replace <code>Self</code> with <code>dyn Foo&lt;Bar=X&gt;</code></p>



<a name="160244471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244471">(Mar 07 2019 at 22:35)</a>:</h4>
<p>would that cause a soundness problem of some kind or get us into "existential types"</p>



<a name="160244486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244486">(Mar 07 2019 at 22:35)</a>:</h4>
<p>in this case, if we did that, we would have <code>&lt;&lt;dyn Foo&lt;Bar=X&gt; as Foo&gt;::Bar as Iterator&gt;::Item: Send</code></p>



<a name="160244491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244491">(Mar 07 2019 at 22:35)</a>:</h4>
<p>the inner type there is equivalent to just <code>X</code></p>



<a name="160244497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244497">(Mar 07 2019 at 22:35)</a>:</h4>
<p>so you get <code>&lt;X as Iterator&gt;::Item: Send</code></p>



<a name="160244554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244554">(Mar 07 2019 at 22:36)</a>:</h4>
<p>basically, the only thing we are doing with <code>Self</code> is projecting associated types out of it</p>



<a name="160244556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244556">(Mar 07 2019 at 22:36)</a>:</h4>
<p>which we already permit</p>



<a name="160244568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244568">(Mar 07 2019 at 22:36)</a>:</h4>
<p>this is my intuition, anyway</p>



<a name="160244578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244578">(Mar 07 2019 at 22:36)</a>:</h4>
<p>(we permit it precisely because their values are all specified in the <code>dyn</code> type)</p>



<a name="160244601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244601">(Mar 07 2019 at 22:36)</a>:</h4>
<p>hmm</p>



<a name="160244609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244609">(Mar 07 2019 at 22:36)</a>:</h4>
<p>makes sense, I think</p>



<a name="160244611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244611">(Mar 07 2019 at 22:36)</a>:</h4>
<p>(whereas in the other desugaring, we would need to permit projecting an associated type out when its value is <strong>not</strong> specified in the <code>dyn</code> type)</p>



<a name="160244626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244626">(Mar 07 2019 at 22:37)</a>:</h4>
<p>yeah, which sounds harder</p>



<a name="160244630"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244630" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244630">(Mar 07 2019 at 22:37)</a>:</h4>
<p>would this require Chalk in either case?</p>



<a name="160244642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244642">(Mar 07 2019 at 22:37)</a>:</h4>
<blockquote>
<p>which we already permit</p>
</blockquote>
<p>in particular we permit things like <code>trait Trait where Self::Foo: Bar { .. }</code> to be object safe</p>



<a name="160244659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244659">(Mar 07 2019 at 22:37)</a>:</h4>
<blockquote>
<p>would this require Chalk in either case?</p>
</blockquote>
<p>well, it's really an existential type sort of situation, I'd certainly rather reason about it in a Chalk-like setting, but I'm not really sure what would be required</p>



<a name="160244669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244669">(Mar 07 2019 at 22:38)</a>:</h4>
<p>it'd be kind of like scala's "path-dependent types"</p>



<a name="160244720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244720">(Mar 07 2019 at 22:38)</a>:</h4>
<p>it can certainly be left for a follow-up PR I'd imagine</p>



<a name="160244722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244722">(Mar 07 2019 at 22:38)</a>:</h4>
<p>unless we desugared it somewhere</p>



<a name="160244727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244727">(Mar 07 2019 at 22:38)</a>:</h4>
<blockquote>
<p>it can certainly be left for a follow-up PR I'd imagine</p>
</blockquote>
<p>what do you mean?</p>



<a name="160244736"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244736" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244736">(Mar 07 2019 at 22:38)</a>:</h4>
<p>making it object-safe</p>



<a name="160244740"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244740" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244740">(Mar 07 2019 at 22:38)</a>:</h4>
<p>ah, ok, sure</p>



<a name="160244745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244745">(Mar 07 2019 at 22:38)</a>:</h4>
<blockquote>
<p>(whereas in the other desugaring, we would need to permit projecting an associated type out when its value is <strong>not</strong> specified in the <code>dyn</code> type)</p>
</blockquote>
<p>this is more than PR :)</p>



<a name="160244758"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244758" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244758">(Mar 07 2019 at 22:38)</a>:</h4>
<p>but leaving the object safety problem for later seems fine</p>



<a name="160244759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244759">(Mar 07 2019 at 22:38)</a>:</h4>
<p>heh</p>



<a name="160244812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244812">(Mar 07 2019 at 22:39)</a>:</h4>
<p>okay... good. but I agree with you, that reasoning about projecting associated types out of a dyn seems fine to me.</p>



<a name="160244842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244842">(Mar 07 2019 at 22:39)</a>:</h4>
<p>we can note it on the tracking issue when I submit the PR (presuming it doesn't tackle that, which I don't think it will)</p>



<a name="160244921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244921">(Mar 07 2019 at 22:40)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> so... the question about desugaring during the typeck phase rather than HIR lowering -- does that make sense to you?</p>



<a name="160244940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160244940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160244940">(Mar 07 2019 at 22:40)</a>:</h4>
<p>(associated type bounds outside of traits would still be desugared in HIR lowering)</p>



<a name="160321820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160321820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160321820">(Mar 08 2019 at 20:17)</a>:</h4>
<blockquote>
<p>so... the question about desugaring during the typeck phase rather than HIR lowering -- does that make sense to you?</p>
</blockquote>
<p><span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> which question is that, sorry?</p>



<a name="160321869"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160321869" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160321869">(Mar 08 2019 at 20:17)</a>:</h4>
<blockquote>
<blockquote>
<p><span class="user-mention silent" data-user-id="124069">Alexander Regueiro</span> <a href="https://github.com/rust-lang/rust/blob/88f755f8a84df1d9e6b17cf10c96ae8b93481b2e/src/librustc_typeck/collect.rs#L2121-L2144" target="_blank" title="https://github.com/rust-lang/rust/blob/88f755f8a84df1d9e6b17cf10c96ae8b93481b2e/src/librustc_typeck/collect.rs#L2121-L2144">this is where we convert the associated type bounds into trait bounds</a></p>
</blockquote>
<p>that makes perfect sense. I wonder, in the case we have associated type bounds within traits (i.e. within associated type definitions), should we leave things like <code>Iterator&lt;Item: Send&gt;</code> alone until typeck time? i.e. have an HIR representation for it?</p>
</blockquote>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> this message I think. (there may have been another one)</p>



<a name="160322635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160322635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160322635">(Mar 08 2019 at 20:27)</a>:</h4>
<p>Ah, I see</p>



<a name="160322638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160322638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160322638">(Mar 08 2019 at 20:27)</a>:</h4>
<p>Hmm</p>



<a name="160322679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160322679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160322679">(Mar 08 2019 at 20:28)</a>:</h4>
<p>I think I would expect to have a HIR representation for it, yes</p>



<a name="160322717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160322717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160322717">(Mar 08 2019 at 20:28)</a>:</h4>
<p>I don't see a "reasonable desugaring" apart from moving the bounds from the associated type up into the trait level</p>



<a name="160322735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160322735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160322735">(Mar 08 2019 at 20:28)</a>:</h4>
<p>and that doesn't .. 100% feel right to me, especially because in GAT-like cases I don't know that we can always do that</p>



<a name="160322874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160322874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160322874">(Mar 08 2019 at 20:30)</a>:</h4>
<p>can't always do what?</p>



<a name="160322878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160322878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160322878">(Mar 08 2019 at 20:30)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span></p>



<a name="160324269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160324269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160324269">(Mar 08 2019 at 20:49)</a>:</h4>
<p>can't always readily do the desugaring at the HIR level</p>



<a name="160324350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160324350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160324350">(Mar 08 2019 at 20:50)</a>:</h4>
<p>maybe you can, but certainly if you were going to do the desugaring, it involves moving things to "different parts of the IR" -- it basically feels a bit too non-local for me</p>



<a name="160325073"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160325073" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160325073">(Mar 08 2019 at 20:58)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> ah yes, exactly. I mean, I think you <em>could</em> at least in the non-GAT case, but it would be messy</p>



<a name="160325087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160325087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160325087">(Mar 08 2019 at 20:59)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> yes, this is precisely my reasoning. :-)</p>



<a name="160325115"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/160325115" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#160325115">(Mar 08 2019 at 20:59)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> still happy with doing HIR-level desugaring for associated type bounds outside of traits though, yeah?</p>



<a name="161483267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/161483267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#161483267">(Mar 22 2019 at 20:58)</a>:</h4>
<p>So <span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> -- your PR is almost ready, you were saying?</p>



<a name="161483274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/161483274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#161483274">(Mar 22 2019 at 20:58)</a>:</h4>
<p>yep!</p>



<a name="161483284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/161483284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#161483284">(Mar 22 2019 at 20:58)</a>:</h4>
<p>I could do with some advice on a diagnostics message, but that's literally it</p>



<a name="161483331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/161483331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#161483331">(Mar 22 2019 at 20:59)</a>:</h4>
<p>Dear <span class="user-group-mention" data-user-group-id="692">@WG-traits</span>, I was thinking that, instead of having me review this solo, maybe we could find somebody else to review it. It could be a good mentoring opportunity. We could do this many ways -- e.g., you could do a pre-pass, find questions, and then we can discuss them together. Or we could schedule some time to do a first review, etc. But I'd like to not be on the hook entirely :) especially as I'll be traveling a lot next week.</p>



<a name="161483376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/161483376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#161483376">(Mar 22 2019 at 20:59)</a>:</h4>
<p>I volunteer as tribute :P</p>



<a name="161483465"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/161483465" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#161483465">(Mar 22 2019 at 21:00)</a>:</h4>
<p>sounds good</p>



<a name="161483484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/161483484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#161483484">(Mar 22 2019 at 21:00)</a>:</h4>
<p>we can discuss exact strategy next week :)</p>



<a name="161483534"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/161483534" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#161483534">(Mar 22 2019 at 21:01)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> in the meanwhile I'll probably move on to investigating the impl Trait lifetime issue</p>



<a name="161483572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/161483572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#161483572">(Mar 22 2019 at 21:01)</a>:</h4>
<p>hmm, ok, seems fine, but we should also consider what is best choice</p>



<a name="161484091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/161484091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#161484091">(Mar 22 2019 at 21:07)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> well you've not really been available for technical discussion the last couple of weeks, and it looks like you won't for at least 10 more days? maybe best for you just to look at it and give a nod or not, since you're so busy. :-)</p>



<a name="161487971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/161487971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#161487971">(Mar 22 2019 at 22:05)</a>:</h4>
<p><span class="user-mention" data-user-id="116010">@Aaron Turon</span> cool; I made a shit tonne of tests for the PR for you to read :P</p>



<a name="164592526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/164592526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#164592526">(May 01 2019 at 01:44)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> okay so I'm almost through with a pre-pass through the code</p>



<a name="164592540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/164592540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#164592540">(May 01 2019 at 01:45)</a>:</h4>
<p>maybe we can schedule time to chat through the "interesting" bits</p>



<a name="164598709"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/164598709" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#164598709">(May 01 2019 at 04:15)</a>:</h4>
<p><span class="user-mention" data-user-id="116883">@tmandry</span> happy to join you</p>



<a name="165015705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165015705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165015705">(May 06 2019 at 20:22)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span class="user-mention" data-user-id="126931">@centril</span> when are you free to chat this week? I'm free from 1:30-6pm PST today, tomorrow, and most of wednesday</p>



<a name="165015946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165015946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165015946">(May 06 2019 at 20:25)</a>:</h4>
<p>I can also do friday morning</p>



<a name="165016009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165016009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165016009">(May 06 2019 at 20:26)</a>:</h4>
<p>Wednesday seems good</p>



<a name="165016047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165016047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165016047">(May 06 2019 at 20:26)</a>:</h4>
<p>I could do 12:30-13:30 Boston time</p>



<a name="165016348"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165016348" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165016348">(May 06 2019 at 20:30)</a>:</h4>
<p>that works</p>



<a name="165016380"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165016380" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165016380">(May 06 2019 at 20:31)</a>:</h4>
<p>can we please use UTC? :D</p>



<a name="165016458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165016458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165016458">(May 06 2019 at 20:32)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> 16:30-17:30 UTC :)</p>



<a name="165016504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165016504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165016504">(May 06 2019 at 20:33)</a>:</h4>
<p>17:30 Monday, Central European Time (CET)  works for me</p>



<a name="165016516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165016516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165016516">(May 06 2019 at 20:33)</a>:</h4>
<p>(I mean wednesday)</p>



<a name="165016747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165016747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165016747">(May 06 2019 at 20:36)</a>:</h4>
<p>I can only do that one slot, basically, or possibly much later.</p>



<a name="165016807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165016807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165016807">(May 06 2019 at 20:37)</a>:</h4>
<p>So I think either</p>
<ul>
<li>12:30 UTC-04:00 or</li>
<li>14:30 UTC-04:00</li>
</ul>



<a name="165016812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165016812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165016812">(May 06 2019 at 20:37)</a>:</h4>
<p>not <em>that</em> much later</p>



<a name="165016816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165016816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165016816">(May 06 2019 at 20:37)</a>:</h4>
<p>17:30 CET == 16:30 UTC, so I think we're good</p>



<a name="165016890"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165016890" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165016890">(May 06 2019 at 20:38)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I believe both times work for me</p>



<a name="165016900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165016900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165016900">(May 06 2019 at 20:38)</a>:</h4>
<p>but please make a calendar entry because I'm a forgetful person :D</p>



<a name="165016906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165016906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165016906">(May 06 2019 at 20:38)</a>:</h4>
<p>Oh, I didn't notice that <span class="user-mention" data-user-id="126931">@centril</span> switched from UTC to CET =)</p>



<a name="165016907"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165016907" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165016907">(May 06 2019 at 20:38)</a>:</h4>
<p>ok</p>



<a name="165016951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165016951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165016951">(May 06 2019 at 20:39)</a>:</h4>
<p>Looks like <a href="https://github.com/zulip/zulip/issues/5176" target="_blank" title="https://github.com/zulip/zulip/issues/5176">https://github.com/zulip/zulip/issues/5176</a> might be close to landing :)</p>



<a name="165016955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165016955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165016955">(May 06 2019 at 20:39)</a>:</h4>
<p>/me hopes</p>



<a name="165016967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165016967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165016967">(May 06 2019 at 20:39)</a>:</h4>
<p>Hmm, maybe not</p>



<a name="165017049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165017049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165017049">(May 06 2019 at 20:40)</a>:</h4>
<p>...actually, can we do the second slot <span class="user-mention" data-user-id="116009">@nikomatsakis</span>? :)</p>



<a name="165017110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165017110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165017110">(May 06 2019 at 20:41)</a>:</h4>
<p>OK</p>



<a name="165017120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165017120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165017120">(May 06 2019 at 20:41)</a>:</h4>
<p>sent calendar invites</p>



<a name="165017200"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165017200" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165017200">(May 06 2019 at 20:42)</a>:</h4>
<p>cheers; btw, I haven't checked the implementation but I wrote a lot of the tests; per my second to last comment on the PR I think some more tests may be needed</p>



<a name="165187567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165187567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165187567">(May 08 2019 at 18:21)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span class="user-mention" data-user-id="116883">@tmandry</span> are we using Zoom?</p>



<a name="165187574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165187574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165187574">(May 08 2019 at 18:21)</a>:</h4>
<p>would be nice</p>



<a name="165187876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165187876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165187876">(May 08 2019 at 18:24)</a>:</h4>
<p>That works for me. FYI I may be a few minutes late</p>



<a name="165188713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165188713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165188713">(May 08 2019 at 18:35)</a>:</h4>
<p>Okay I'm around <span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span class="user-mention" data-user-id="126931">@centril</span></p>



<a name="165189231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165189231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165189231">(May 08 2019 at 18:41)</a>:</h4>
<p>link to PR: <a href="https://github.com/rust-lang/rust/pull/57428" target="_blank" title="https://github.com/rust-lang/rust/pull/57428">https://github.com/rust-lang/rust/pull/57428</a></p>



<a name="165189306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165189306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165189306">(May 08 2019 at 18:42)</a>:</h4>
<p>Hey, I'm here</p>



<a name="165189312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165189312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165189312">(May 08 2019 at 18:42)</a>:</h4>
<p>Previous meeting ran over</p>



<a name="165189341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165189341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165189341">(May 08 2019 at 18:43)</a>:</h4>
<p>gimme a second</p>



<a name="165189658"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/165189658" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#165189658">(May 08 2019 at 18:47)</a>:</h4>
<p>ok <a href="https://mozilla.zoom.us/j/603998437" target="_blank" title="https://mozilla.zoom.us/j/603998437">https://mozilla.zoom.us/j/603998437</a></p>



<a name="167423191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423191">(Jun 05 2019 at 19:39)</a>:</h4>
<p>So I think that <a href="https://github.com/rust-lang/rust/pull/57428" target="_blank" title="https://github.com/rust-lang/rust/pull/57428">https://github.com/rust-lang/rust/pull/57428</a> is ready to land, but I'd prefer to leave an "unresovled question" with a link to the test case around nested quantification -- as I noted earlier I think it's probably fine as is, but I haven't had time to think deeply or examine the code about it and I don't know that I will for a bit. <span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> or <span class="user-mention" data-user-id="126931">@centril</span> do you have a link to the test? (I think maybe it was removed from the repo? I'd probably prefer to keep it in...)</p>



<a name="167423236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423236">(Jun 05 2019 at 19:39)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span>  <a href="https://github.com/rust-lang/rust/pull/57428/commits/8b23ecf34225a916529e50ccc1eacacdcefe1c3d" target="_blank" title="https://github.com/rust-lang/rust/pull/57428/commits/8b23ecf34225a916529e50ccc1eacacdcefe1c3d">https://github.com/rust-lang/rust/pull/57428/commits/8b23ecf34225a916529e50ccc1eacacdcefe1c3d</a></p>



<a name="167423307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423307">(Jun 05 2019 at 19:40)</a>:</h4>
<p>I guess as long as we keep it in the history we can link to that =)</p>



<a name="167423321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423321">(Jun 05 2019 at 19:40)</a>:</h4>
<p>There is probably an alternate desugaring that would</p>



<a name="167423333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423333">(Jun 05 2019 at 19:40)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span>  I would suggest preemptively copying the test =P</p>



<a name="167423337"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423337" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423337">(Jun 05 2019 at 19:41)</a>:</h4>
<p>and storing a backup elsewhere</p>



<a name="167423339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423339">(Jun 05 2019 at 19:41)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">fn</span> <span class="nf">nested_bounds_desugared</span><span class="o">&lt;</span><span class="n">_0</span><span class="p">,</span><span class="w"> </span><span class="n">_1</span><span class="p">,</span><span class="w"> </span><span class="n">_2</span><span class="p">,</span><span class="w"> </span><span class="n">D</span><span class="o">&gt;</span><span class="p">()</span><span class="w"></span>
<span class="k">where</span><span class="w"></span>
<span class="w">    </span><span class="n">D</span>: <span class="nb">Clone</span> <span class="o">+</span><span class="w"> </span><span class="nb">Iterator</span><span class="o">&lt;</span><span class="n">Item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">_2</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">_2</span>: <span class="nb">Send</span> <span class="o">+</span><span class="w"> </span><span class="k">for</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="o">&gt;</span><span class="w"> </span><span class="nb">Iterator</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="k">for</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;b</span><span class="o">&gt;</span><span class="w"> </span><span class="o">&lt;</span><span class="n">_2</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nb">Iterator</span><span class="o">&gt;</span>::<span class="n">Item</span>: <span class="nc">Lam</span><span class="o">&lt;&amp;</span><span class="na">&#39;a</span><span class="w"> </span><span class="o">&amp;</span><span class="na">&#39;b</span><span class="w"> </span><span class="kt">u8</span><span class="p">,</span><span class="w"> </span><span class="n">App</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">_0</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="c1">//~^ ERROR nested quantification of lifetimes [E0316]</span>
<span class="w">    </span><span class="n">_0</span>: <span class="nc">Debug</span><span class="p">,</span><span class="w"></span>
<span class="p">{}</span><span class="w"></span>
</pre></div>



<a name="167423352"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423352" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423352">(Jun 05 2019 at 19:41)</a>:</h4>
<p>basically that</p>



<a name="167423364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423364">(Jun 05 2019 at 19:41)</a>:</h4>
<p>I think what I would prefer is to keep the test with an alternate desugaring</p>



<a name="167423368"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423368" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423368">(Jun 05 2019 at 19:41)</a>:</h4>
<p>(and hence no error)</p>



<a name="167423382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423382">(Jun 05 2019 at 19:41)</a>:</h4>
<p>seems slightly more complicated</p>



<a name="167423384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423384">(Jun 05 2019 at 19:41)</a>:</h4>
<p>I'm actually not even sure if we need more follow-up -- I mostly wanted to trace through the code to convince myself it was handling the binders correctly, I guess</p>



<a name="167423385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423385">(Jun 05 2019 at 19:41)</a>:</h4>
<p>but sure</p>



<a name="167423445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423445">(Jun 05 2019 at 19:42)</a>:</h4>
<p>maybe we should lift the syntactic restriction around nesting everywhere?</p>



<a name="167423455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423455">(Jun 05 2019 at 19:42)</a>:</h4>
<p>plausibly</p>



<a name="167423473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423473">(Jun 05 2019 at 19:42)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> there are other tests missing: <a href="https://github.com/rust-lang/rust/pull/57428#issuecomment-489336637" target="_blank" title="https://github.com/rust-lang/rust/pull/57428#issuecomment-489336637">https://github.com/rust-lang/rust/pull/57428#issuecomment-489336637</a></p>



<a name="167423479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423479">(Jun 05 2019 at 19:42)</a>:</h4>
<p>but we can add those later</p>



<a name="167423484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423484">(Jun 05 2019 at 19:42)</a>:</h4>
<p>a checkbox for that would be nice</p>



<a name="167423627"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423627" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423627">(Jun 05 2019 at 19:44)</a>:</h4>
<p>sounds right</p>



<a name="167423635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423635">(Jun 05 2019 at 19:44)</a>:</h4>
<p>it seems like we should land this branch</p>



<a name="167423642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423642">(Jun 05 2019 at 19:44)</a>:</h4>
<p>I'd be happy with some checkboxes listing tests we want (possibly including the above one)</p>



<a name="167423644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423644">(Jun 05 2019 at 19:44)</a>:</h4>
<p>and not blocking this branch anymore</p>



<a name="167423656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423656">(Jun 05 2019 at 19:45)</a>:</h4>
<p>( maybe you or <span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> can do that? )</p>



<a name="167423826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423826">(Jun 05 2019 at 19:46)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span>  Yep; I've been meaning to write those tests but as always one wishes one had 4 hands :P</p>



<a name="167423833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423833">(Jun 05 2019 at 19:46)</a>:</h4>
<p>I agree we should land ASAP</p>



<a name="167423836"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423836" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423836">(Jun 05 2019 at 19:46)</a>:</h4>
<p>and then iterate</p>



<a name="167423896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423896">(Jun 05 2019 at 19:48)</a>:</h4>
<p>just making a list of the tests that are needed seems fine</p>



<a name="167423941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167423941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167423941">(Jun 05 2019 at 19:48)</a>:</h4>
<p>and putting them in the tracking issue header</p>



<a name="167424171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167424171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167424171">(Jun 05 2019 at 19:51)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span class="user-mention" data-user-id="126931">@centril</span> sounds fair on both counts</p>



<a name="167424674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167424674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167424674">(Jun 05 2019 at 19:57)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span>  added to the tracking issue, <a href="https://github.com/rust-lang/rust/issues/52662" target="_blank" title="https://github.com/rust-lang/rust/issues/52662">https://github.com/rust-lang/rust/issues/52662</a></p>



<a name="167425107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167425107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167425107">(Jun 05 2019 at 20:02)</a>:</h4>
<p>seems like I broke the branch <span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> -- kind of disappointed to learn that a function named <code>xxx_inner</code> is public</p>



<a name="167425114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167425114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167425114">(Jun 05 2019 at 20:02)</a>:</h4>
<p>but I guess that's most likely pre-existing</p>



<a name="167425180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167425180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167425180">(Jun 05 2019 at 20:03)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span>  btw, did y'all split the feature gates in the end?</p>



<a name="167425185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167425185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167425185">(Jun 05 2019 at 20:03)</a>:</h4>
<p>(dyn, not dyn)</p>



<a name="167425864"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167425864" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167425864">(Jun 05 2019 at 20:10)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> yeah that was pre-existing heh. inner is a bad name for it I think.</p>



<a name="167425871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167425871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167425871">(Jun 05 2019 at 20:10)</a>:</h4>
<p>want me to change it?</p>



<a name="167425928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167425928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167425928">(Jun 05 2019 at 20:11)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> thanks fro adding the checkboxoes</p>



<a name="167425944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167425944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167425944">(Jun 05 2019 at 20:11)</a>:</h4>
<p>np</p>



<a name="167426048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167426048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167426048">(Jun 05 2019 at 20:12)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> should I just make it <code>pub(super)</code> for now?</p>



<a name="167426619"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167426619" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167426619">(Jun 05 2019 at 20:18)</a>:</h4>
<p>ah, that's what it was beforee</p>



<a name="167426626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167426626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167426626">(Jun 05 2019 at 20:18)</a>:</h4>
<p>just remove this commit for now?</p>



<a name="167427206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/associate%20type%20bounds/near/167427206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/associate.20type.20bounds.html#167427206">(Jun 05 2019 at 20:25)</a>:</h4>
<p>sure</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>